﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using WB.Entity;
using WB.DaoHelper;
using WB.Library;
public partial class Product_Detail : System.Web.UI.Page
{
    public ProductsEntity p;
    public int Id
    {
        get { return FNumber.ConvertInt(Request["id"]); }
    }

    public int CatId
    {
        get { return FNumber.ConvertInt(Request["catid"]); }
    }

    protected void Page_Load(object sender, EventArgs e)
    {
        LoadData();
    }

    void LoadData()
    {
        p = ProductsDao.Instants().GetByIntId(Id);
        if (p != null)
        {
            CategoryEntity cat = CategoryDao.Instants().SelectOne(p.CategoryId);
            if (cat != null)
            {
                Category1.ParentCode = cat.ParentCode;
            }
            Category1.LoadData();
        }
    }
}
